package com.yugao.fintech.draper.redisson.config;

import com.yugao.fintech.draper.redisson.resolver.impl.DefaultDistributedLockKeyResolver;
import com.yugao.fintech.draper.redisson.resolver.impl.ExpressionDistributedLockKeyResolver;
import com.yugao.fintech.draper.redisson.aspect.DistributedLockAspect;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

@AutoConfiguration
public class DistributedLockAspectConfig {

    @Bean
    public DefaultDistributedLockKeyResolver defaultDistributedLockKeyResolver() {
        return new DefaultDistributedLockKeyResolver();
    }

    @Bean
    public ExpressionDistributedLockKeyResolver expressionDistributedLockKeyResolver() {
        return new ExpressionDistributedLockKeyResolver();
    }

    @Bean
    public DistributedLockAspect distributedLockAspect() {
        return new DistributedLockAspect();
    }

}
